/*
 * BubbleSort.c
 *
 *  Created on: 18/04/2013
 *      Author: lucho0
 */

#include "bubblesort.h"

void bubblesort(char** words, int length) {
	int i;
	char* swap;
	int elementoActual;
	for (i = 0; i <= length - 1; ++i) {
		for (elementoActual = 0; elementoActual < length - 1;
				++elementoActual) {

			if (MyStrCmp(words[elementoActual], words[elementoActual + 1]) > 0) {
				swap = words[elementoActual];
				words[elementoActual] = words[elementoActual + 1];
				words[elementoActual + 1] = swap;
			}

		}

	}
}
